[XM][XEND] Speed up xm list
authorAlastair Tse <atse@xensource.com>
Thu, 5 Oct 2006 16:29:20 +0000 (17:29 +0100)
committerAlastair Tse <atse@xensource.com>
Thu, 5 Oct 2006 16:29:20 +0000 (17:29 +0100)
Signed-off-by: Alastair Tse <atse@xensource.com>
tools/python/xen/xend/server/XMLRPCServer.py
tools/python/xen/xm/main.py

index b366eec29ca43d555608a4c44784ea2760ad6e4b..73d0d20fd4a46b7313a73ed1755cc2849ac54cbc 100644 (file)
@@ -53,12 +53,12 @@ def domain(domid):
     info = lookup(domid)
     return fixup_sxpr(info.sxpr())
 
-def domains(detail=1):
+def domains(detail=1, full = 0):
     if detail < 1:
         return XendDomain.instance().list_names()
     else:
         domains = XendDomain.instance().list_sorted()
-        return map(lambda dom: fixup_sxpr(dom.sxpr()), domains)
+        return map(lambda dom: fixup_sxpr(dom.sxpr(not full)), domains)
 
 def domain_create(config):
     info = XendDomain.instance().domain_create(config)
index d251dfec999589ea57bb788153c0254e90791583..6827eae0430e9146699e22b78546a82fa4e80598 100644 (file)
@@ -483,7 +483,7 @@ def xm_restore(args):
 
 def getDomains(domain_names, full = 0):
     if domain_names:
-        return [server.xend.domain(dom) for dom in domain_names]
+        return [server.xend.domain(dom, full) for dom in domain_names]
     else:
         return server.xend.domains(1)